package com.bo.wei.chen.mybatis;

/**
 * TODO
 *
 * @author chenwb25485
 * @version V2.1
 * @since 2020/9/30 16:52
 */
class Solution {
	public int[] twoSum(int[] nums, int target) {
		int[] result = new int[2];
		for (int i = 0; i < nums.length; i++) {
			for (int j = nums.length - 1; j > 0; j--) {
				if (nums[i] + nums[j] == target) {
					result[0] = i;
					result[1] = j;
					break;
				}
			}
		}
		return result;
	}
}
